Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

acme-client

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

acme-client

Simple and unopinionated ACME client

  • 4.2.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
44K
decreased by-90.84%
Maintainers
1
Weekly downloads
 
Created

What is acme-client?

The acme-client npm package is a client library for the ACME (Automated Certificate Management Environment) protocol, which is used to automate the process of obtaining and renewing SSL/TLS certificates. It is commonly used with Let's Encrypt, a free, automated, and open Certificate Authority.

What are acme-client's main functionalities?

Creating an ACME client instance

This code demonstrates how to create an instance of the ACME client. The client is configured to use Let's Encrypt's production directory and a newly generated account key.

const acme = require('acme-client');
const client = new acme.Client({
  directoryUrl: acme.directory.letsencrypt.production,
  accountKey: await acme.forge.createPrivateKey()
});

Creating a new account

This code shows how to create a new account with the ACME server. It agrees to the terms of service and provides a contact email.

await client.createAccount({
  termsOfServiceAgreed: true,
  contact: ['mailto:admin@example.com']
});

Generating a certificate

This code demonstrates how to generate a certificate signing request (CSR) and then use the ACME client to automatically obtain a certificate for the domain 'example.com'.

const [key, csr] = await acme.forge.createCsr({
  commonName: 'example.com'
});
const cert = await client.auto({
  csr,
  email: 'admin@example.com',
  termsOfServiceAgreed: true
});

Renewing a certificate

This code shows how to renew an existing certificate using the ACME client. It requires the existing certificate and CSR.

const renewedCert = await client.renewCertificate({
  certificate: existingCert,
  csr: existingCsr
});

Other packages similar to acme-client

Keywords

FAQs

Package last updated on 21 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc